module BooksHelper
  def format_state(state)
    case state
      when Book::STATE_AVAILABLE then 'Available'
      when Book::STATE_BORROWED then 'Borrowed'
      when Book::STATE_BLOCKED then 'Blocked'
      else state
    end
  end
end
